package de;

import java.sql.SQLException;
import java.util.ArrayList;

import de.shb.signature.business.SignaturBusiness;
import de.shb.signature.dao.SignaturBean;
import de.shb.util.dao.Manager;
import de.shb.util.presentation.InputPresentationClient;

public class Start {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		 // Connection settings
        // (you can pass a DataSource (recommended))
        try {
			Manager.getInstance().setJdbcDriver("com.mysql.jdbc.Driver");
			Manager.getInstance().setJdbcUrl("jdbc:mysql://localhost:3306/boBB");
	        Manager.getInstance().setJdbcUsername("root");
	        Manager.getInstance().setJdbcPassword("root");
		} catch (Exception e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
        
		
		InputPresentationClient ib = SignaturBusiness.getInstance();
		try {
			SignaturBean input2 = ib.createInput("a1", "a2", "a3", "a4");

			ArrayList<SignaturBean> inputs;

			inputs = ib.findAllInput();
			System.out.println("Suchergebnisse;");
			for (SignaturBean in : inputs)
				System.out.println(in);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

}
